package com.zhiketuan.webserver.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wordnik.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统管理员实体
 *
 * @author 凡梦星尘(elkan1788@gmail.com)
 */
@ApiModel(value = "系统管理员", description = "系统管理员")
public class SysAdmin implements Serializable {

    @ApiModelProperty(hidden = true, required = false)
    private Integer adminId;
    @ApiModelProperty(required = true, value = "账号", notes = "长度为6-16位", example = "sysadmin")
    private String account;
    @ApiModelProperty(required = true, value = "登录口令", notes = "长度为6-16位", example = "sysadmin")
    private String password;
    @ApiModelProperty(required = true, value = "管理员类型", notes = "0: 超级管理员, 1: 普通管理员", example = "1")
    private Integer adminType;
    @ApiModelProperty(hidden = true, required = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastLoginTime;
    @ApiModelProperty(value = "备注信息", example = "API 管理员")
    private String remark;

    public SysAdmin() {
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getAdminType() {
        return adminType;
    }

    public void setAdminType(Integer adminType) {
        this.adminType = adminType;
    }

    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "SysAdmin{" +
                "adminId=" + adminId +
                ", account='" + account + '\'' +
                ", password='" + password + '\'' +
                ", adminType=" + adminType +
                ", lastLoginTime=" + lastLoginTime +
                ", remark='" + remark + '\'' +
                '}';
    }
}
